All Questions
6 questions
4votes
4answers
39kviews
How to write a proper class to connect to database in Java
I'm currently writing an application and I'm struggling with the decision of how to correctly design a class to connect to a database. I came up with something like this: public class ...
7votes
3answers
17kviews
Transaction handling in DAO or Service layer in pure JDBC without frameworks
I have an application which works with pure JDBC. I have a dilemma where should transaction handling go, in Service or DAO layer. I have found that in most cases it should be implemented in Service ...
1vote
2answers
2kviews
A good way to program for closing a long running MySQL connection and re-open it at intervals?
I'm running a Java application that creates 50 threads as part of a threadpool; each thread running in an object that reads 1000 unique rows at a time from a MySQL table. So each object has it's own ...
3votes
5answers
14kviews
Java desktop app with mysql database
I'm currently in the process of learning Java and swing and in doing so am trying to create a desktop app. As part of this app I have set up a mysql database which the app is connected to, however I'...
1vote
1answer
1kviews
How to structure programs that interact with databases? [closed]
I've just finished a book on MySQL and I'm in the infantile stages of learning to couple that with Java. I know that the technology I need to learn is called JDBC and that it essentially allows you to ...
1vote
2answers
1kviews
Database design
I'm on the way developing an application which requires a kind of dynamic database, So this is what I want, This is the for reading the details of a class, the number of variables and methods will ...